﻿<UserControl x:Class="Blacklight.ShowCase.Samples.SyndicationFeedListBoxSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
       xmlns:controls="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
    >

    <UserControl.Resources>

        <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">
            <controls:ResourceDictionaryManager.ResourceDictionaries>
                <controls:ResourceDictionaryCollection>

                    <controls:ResourceDictionary Path="/Blacklight.ShowCase;component/ResourceDictionaries/DavesGlossyControls.xaml">
                        <controls:ResourceDictionary.ResourceKeys>
                            <controls:ResourceKeyCollection>
                                <controls:ResourceKey ResourceName="GlossyBlackComboBox" />
                            </controls:ResourceKeyCollection>
                        </controls:ResourceDictionary.ResourceKeys>
                    </controls:ResourceDictionary>

                </controls:ResourceDictionaryCollection>
            </controls:ResourceDictionaryManager.ResourceDictionaries>
        </controls:ResourceDictionaryManager>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" MaxWidth="150" />
        </Grid.ColumnDefinitions>

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="1" Text="Feed Url" VerticalAlignment="Center" />
        <TextBox Margin="5,0,5,0" Grid.Column="1" Grid.Row="1" FontSize="14" FontFamily="Verdana" Text="GetStream.aspx?url=http://blogs.msdn.com/mgrayson/rss.xml" x:Name="feedUrl" />
        <Button Content="Go" x:Name="GoButton" Width="25" Grid.Column="2" Grid.Row="1" Style="{StaticResource ButtonStyle}" Foreground="#ffffffff" />
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="1" Grid.Column="3" TextWrapping="Wrap"
                   Text="(The Url feed. GetDetails.aspx provides a method of getting feeds that don't have a client access policy file.) " VerticalAlignment="Center" />
        
        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Text="Feed Url Kind" VerticalAlignment="Center" />
        <ComboBox Grid.Column="1" x:Name="feedKindComboBox" Style="{StaticResource GlossyBlackComboBox}" MinWidth="150" Foreground="#ffffffff" VerticalAlignment="Center"
                  Margin="5" Height="25" HorizontalAlignment="Left" MaxWidth="150" />
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="0" Grid.Column="3" TextWrapping="Wrap"
                   Text="(The Url feed kind. Select Relative if using GetDetails.aspx.) " VerticalAlignment="Center" />


        <controls:ClippingBorder CornerRadius="10" Grid.Row="2" Grid.ColumnSpan="4" Margin="0,15,0,0">
            <controls:ClippingBorder.Background>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#ff333333" />
                    <GradientStop Color="#ff111111" Offset="1" />
                </LinearGradientBrush>
            </controls:ClippingBorder.Background>
            
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                
                <Button x:Name="RefreshButton"
                        Content="REFRESH"
                        Margin="5"
                        HorizontalAlignment="Right"
                        Style="{StaticResource ButtonStyle}"
                        Foreground="#ffffffff"
                        />
                
                <controls:SyndicationFeedListBox x:Name="SyndicationFeedListBox"
                                                 FeedUri="GetStream.aspx?url=http://blogs.msdn.com/mgrayson/rss.xml"
                                                 FeedUriKind="Relative"
                                                 RefreshButtonName="RefreshButton"
                                                 Grid.Row="1"
                                                 Margin="5"
                                                 BorderBrush="#7fffffff"
                                                 BorderThickness="0,1,0,0"
                                                 />
            </Grid>

        </controls:ClippingBorder>

    </Grid>
</UserControl>
